Sometimes the length of a node value needs to be determined in XSLT. I used to process it like this:
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->But then I found out the problem. If there are carriage return and other characters between nodes, it will be considered as the value> 1. So I used a function to remove the white space in the
Any programming language or SQL statement has built-in functions or methods, and so is the powerful and flexible XSLT technique. Mastering the use of XSLT's common functions, XSLT's application will become so easy that you will find that XSLT is more bull than you think! The following is a description and reference example of an XSLT numeric function with an
from the first character to the second character asS3(SoS3equals "AB"), its extended string should is "ABA"; If we select the substring from the third character to the fourth character asS3, its extended string should is "ABC"; If we select the substring from the fourth character to the fifth character asS3, its extended string should is "BC".Since the difficult
/*Known strings use a chained storage structure with knots (For details, refer to linksrting. h file ),Please write the function linkstring substring (linkstring S, int I, int Len ),In string S, the Child string whose length is Len is obtained from position I. The function returns the child string chain table.*/# Inclu
To meet project requirements, perform a COOKIE content length limit test and make a record for your reference. The test design is as follows:
(1) No Cookie of the same name is set on the current page;
(2) The Cookie with the same name has been set on the current page;
The main test code is as follows:
// A super-long
Cut the string according to the specified display length and cut the string
When processing TextView display text in the past two days, you need to cut the string into several segments of the same length and display the text according to the specified
The most accurate php intercepts the string length function and intercepts the string. The most accurate php truncation string length function, the interception string is the most precise interception
important thing are that it must be C Onnected by a cyclic chain which means the color of pearls is cyclic connected from the left to right. And the cyclic count must is more than one. If you connect the leftmost pearl and the rightmost pearl of such chain, you can make a charmbracelet. Just like the pictrue below, this charmbracelet ' s cycle was 9 and its cyclic count is 2:
Now CC have brought in some ordinary bracelet chains, he wants to buy minimum number of pearls to make charmbracel
The most accurate PHP intercept string length function, intercept string
Said is the most accurate interception length, in fact, I am not sure whether it is the most accurate, specific how accurate to see the following effect will know:First, the string for the
%substring}
Delete the substring of the shortest match $substring from the end of the variable $string
${string%%substring}
Delete the substring of the longest matching $substring from the end of the variable $string
${string/substring/replacement}
${string%substring}
Delete the substring of the shortest match $substring from the end of the variable $string
${string%%substring}
Delete the substring of the longest matching $substring from the end of the variable $string
of the variable $string
${string%%substring}
Delete the substring of the longest matching $substring from the end of the variable $string
${string/substring/replacement}
Use $replacement to replace the first matching $substring
${
$string
${string%%substring}
Delete the substring of the longest matching $substring from the end of the variable $string
${string/substring/replacement}
Use $replacement to replace the first matching $substring
${
${string%substring}
Delete the substring of the shortest match $substring from the end of the variable $string
${string%%substring}
Delete the substring of the longest matching $substring from the end of the variable $string
${
Description: "* $substring" can be a regular expression.
1. Length[Web97@salewell97 ~]$ test= ' I love '
[Web97@salewell97 ~]$ echo ${#test}
12
${#变量名} Get string length
2. Intercept string
[Chengmo@localhost ~]$
, delete the substring that matches the minimum $ substring.
$ {String ## substring}
Removes the substring that matches $ substring at the beginning of the variable $ string.
$ {String % substring}
Removes the substring that matches the minimum value of $ substring from the end of the variable $ string
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.